/*
 * @Author: Clark
 * @Email: haixuanwoTxh@gmail.com
 * @Date: 2023-01-04 16:40:42
 * @LastEditors: Clark
 * @LastEditTime: 2023-01-04 16:41:59
 * @Description: file content
 */

#include "apue.h"

int main()
{
    char buf[MAXLINE] = {0};

    while (1)
    {
        if (NULL == fgets(buf, MAXLINE, stdin))
        {
            break;
        }

        if (EOF == fputs(buf, stdout))
        {
            err_sys("output error");
        }
    }

    if (ferror(stdin))
    {
        err_sys("input error");
    }

    exit(0);
}
